package net.lovesrc.allin.config.beans;

import net.lovesrc.support.service.dama.DaMaService;
import net.lovesrc.support.service.dama.YunDaMaService;
import net.lovesrc.support.service.geetest.GeetestService;
import net.lovesrc.support.service.generator.idcard.IDCardGeneratorService;
import net.lovesrc.support.service.generator.idcard.IDCardGeneratorServiceImpl;
import net.lovesrc.support.service.generator.idcard.IDCardGeneratorServiceWebImpl;
import net.lovesrc.support.service.imageverifycode.FeiFeiImageVerifyCodeService;
import net.lovesrc.support.service.imageverifycode.ImageVerifyCodeService;
import net.lovesrc.support.service.mobile.DefaultMobileService;
import net.lovesrc.support.service.mobile.MobileService;
import net.lovesrc.support.service.mobileverifycode.*;
import net.lovesrc.support.service.picprocess.PicService;
import net.lovesrc.support.service.picprocess.ThumbnailsPicServiceImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ServiceSupportConfiguration {

    @Bean
    public MobileService mobileService() {
        return new DefaultMobileService();
    }

    @Bean
    public MobileVerifyCodeService mobileVerifyCodeService() {
        return new YiMaMobileVerifyCodeService(
                "http://api.fxhyd.cn",
                "liuzheqiang",
                "abcd4321"
        );
    }

    @Bean
    public DuanZuMobileVerifyCodeService duanZuMobileVerifyCodeService() {
        return new DuanZuMobileVerifyCodeService(
                "http://api.jmyzm.com",
                "zxl88991",
                "zxl123456"
        );
    }
    @Bean(name = "noNameMobileVerifyCodeService")
    public NoNameMobileVerifyCodeService noNameMobileVerifyCodeService() {
        return new NoNameMobileVerifyCodeService(
                "http://119.29.88.137:8001",
                "zxl8899",
                "zxl123456"
        );
    }
    @Bean(name = "xiaoBaiMobileVerifyCodeService")
    public XiaoBaiMobileVerifyCodeService xiaoBaiMobileVerifyCodeService() {
        return new XiaoBaiMobileVerifyCodeService(
                "http://api.xiaobai188.com:188",
                "zxl8899",
                "zxl123456"
        );
    }

    @Bean
    public GeetestService geetestService() {
        return new GeetestService();
    }

    @Bean
    public PicService picService() {
        return new ThumbnailsPicServiceImpl();
    }

    @Bean
    public IDCardGeneratorService idCardGeneratorService() {
        return new IDCardGeneratorServiceImpl();
    }

    @Bean
    public ImageVerifyCodeService imageVerifyCodeService() {
        return new FeiFeiImageVerifyCodeService("108127", "4xn5oQVRr9eLlXCq2CoK7uImi8DLp6xE");
    }

    @Bean
    public HuoYunMobileVerifyCodeService huoYunMobileVerifyCodeService() {
        return new HuoYunMobileVerifyCodeService("http://embshop.net", "gelic7242538", "7242538abc");
    }

    @Bean
    public DaMaService daMaService() {
        return new YunDaMaService();
    }

}
